package br.com.medvagas.comum.entidade;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedNativeQueries;
import javax.persistence.NamedNativeQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * The persistent class for the vaga_usuario_profissional database table.
 */
@Entity
@Table(name="vaga_usuario_profissional")
@NamedNativeQueries({
	@NamedNativeQuery(
		name="VagaUsuarioProfissional.delete", 
		query="delete from vaga_usuario_profissional where id_vaga = :idVaga", resultClass=VagaUsuarioProfissional.class)
})
public class VagaUsuarioProfissional implements Serializable {
	private static final long serialVersionUID = 1L;

	@EmbeddedId
	private VagaUsuarioProfissionalPK id;

	private String mensagem;

	@Column(name="pretensao_salarial")
	private Double pretensaoSalarial;
	
	@Temporal(TemporalType.TIMESTAMP)
	private Date data;

	//bi-directional many-to-one association to UsuarioProfissional
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="id_usuario_profissional", insertable=false, updatable=false)
	private UsuarioProfissional usuarioProfissional;

	//bi-directional many-to-one association to Vaga
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="id_vaga", insertable=false, updatable=false)
	private Vaga vaga;

    public VagaUsuarioProfissional() {
    }

	public VagaUsuarioProfissionalPK getId() {
		return this.id;
	}

	public void setId(VagaUsuarioProfissionalPK id) {
		this.id = id;
	}
	
	public String getMensagem() {
		return this.mensagem;
	}

	public void setMensagem(String mensagem) {
		this.mensagem = mensagem;
	}

	public Double getPretensaoSalarial() {
		return this.pretensaoSalarial;
	}

	public void setPretensaoSalarial(Double pretensaoSalarial) {
		this.pretensaoSalarial = pretensaoSalarial;
	}

	public UsuarioProfissional getUsuarioProfissional() {
		return this.usuarioProfissional;
	}

	public void setUsuarioProfissional(UsuarioProfissional usuarioProfissional) {
		this.usuarioProfissional = usuarioProfissional;
	}
	
	public Vaga getVaga() {
		return this.vaga;
	}

	public void setVaga(Vaga vaga) {
		this.vaga = vaga;
	}

	public Date getData() {
		return data;
	}

	public void setData(Date data) {
		this.data = data;
	}
	
}